home *** CD-ROM | disk | FTP | other *** search
- Path: ux7.cso.uiuc.edu!djhoward
- From: djhoward@ux7.cso.uiuc.edu (howard daniel joseph)
- Newsgroups: comp.sys.amiga.programmer
- Subject: Re: Something goofy with fscanf(%s) ??
- Date: 29 Jan 1996 03:11:04 GMT
- Organization: University of Illinois at Urbana
- Message-ID: <4ehds8$o2g@vixen.cso.uiuc.edu>
- References: <4ee66r$ffk@vixen.cso.uiuc.edu> <MhW-x*ayf@yaps.rhein.de>
- NNTP-Posting-Host: ux7.cso.uiuc.edu
- X-Newsreader: TIN [version 1.2 PL2]
-
- Arno Eigenwillig (arno@yaps.rhein.de) wrote:
- : In article <4ee66r$ffk@vixen.cso.uiuc.edu>,
- : I-am-unwilling-to-configure-my-newsreader writes:
-
- :)
-
- It works well enough ...
-
- : > Now what this says to me that when fscanf() hits the %22 in the string
- : > it's somehow interpreted funny and thus the second line is read back in as
- : > in the second line.
-
- : fscanf() having problems with % would be rather strange. But how do
- : you do your output? Make sure you don't pass arbitrary strings as 2nd
- : argument to fprintf()...
-
- It's something along the lines of ...
-
- fprintf(stream, "%d %s", int, string);
-
- (I forget the exact syntax ...)
-
- Also, the strings are created in a way that they will not contain
- any spaces (output is stopped once input hits a space ...)
-
- I'm thinking to just take up the fgets() suggestion mentioned
- earlier and then parse that. Just fscanf() is the quickest way ...
-
- --
- =====///====================================================================
- ====///=======This message brought to you by dannyman@uiuc.edu==============
- \\\///=========HOME PAGE! http://www.uiuc.edu/ph/www/djhoward ==============
- =\XX/A1200==================================================================
- My views are my own, and not those of my employer or UIUC. Happy Jim?
-